* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 20px;
}

.header {
    background-color: #1890ff;
    color: white;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 18px;
    font-weight: 500;
}

/* 调试工具样式 */
.debug-tools {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 8px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(255, 255, 255, 0.8);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.switch-label {
    color: white;
    font-size: 12px;
    opacity: 0.8;
}

.main-content {
    position: relative;
    min-height: calc(100vh - 56px);
}

.refresh-tip,
.load-more {
    text-align: center;
    padding: 12px;
    color: #999;
    font-size: 14px;
    transition: all 0.3s;
}

.refresh-tip {
    height: 0;
    overflow: hidden;
    padding: 0;
}

.refresh-tip.active {
    height: auto;
    padding: 12px;
}

.data-list {
    list-style: none;
    background-color: white;
}

/* 数据项样式 - 数据库信息展示 */
.data-item {
    padding: 15px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.data-item:active {
    background-color: #f8f8f8;
}

.database-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.database-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background-color: #f5f5f5;
    padding: 6px;
}

.database-icon-placeholder {
    width: 48px;
    height: 48px;
    background-color: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.database-title-area {
    flex: 1;
}

.database-title-area h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.database-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 12px;
    padding: 2px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    color: #666;
}

.database-description {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.database-info {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #888;
    padding-top: 4px;
    border-top: 1px solid #f0f0f0;
}

.info-item {
    display: inline-block;
}

.loading {
    text-align: center;
    padding: 40px 16px;
    color: #999;
    font-size: 14px;
}

.no-more {
    color: #ccc;
}

/* 骨架屏效果 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.refresh-icon {
    display: inline-block;
    margin-right: 5px;
}

.skeleton-img {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-title {
    width: 80%;
    height: 20px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-desc {
    width: 100%;
    height: 16px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.skeleton-desc:last-child {
    width: 70%;
}